package com.builder;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import com.model.Parametro;
import com.view.ParametroView;

@ManagedBean
@ViewScoped
@SuppressWarnings("serial")
public class ParametroBuilder extends BaseBuilder<ParametroView, Parametro> {

	@Override
	public Parametro toDomain(ParametroView view) {
		return new Parametro(view.getId(), view.getCodigo(), view.getValor(),
				view.getObservaciones());
	}

	@Override
	public ParametroView toView(Parametro model) {
		return new ParametroView(model.getID(), model.getCodigo(),
				model.getValor(), model.getObservaciones());
	}

}
